<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import = "com.mbbmap.security.dao.*" %>
<%@ page import = "com.mbbmap.util.Constants" %>
<%@ page import = "java.util.LinkedHashMap, com.classes.Casemast" %>
<%@page import="com.mbbmap.util.EncryptionHelper"%>
<%
SecUserDao oSecUserDao = (SecUserDao) session.getAttribute(Constants.LOGGED_USER);

LinkedHashMap<String, String> tabs = new LinkedHashMap<String, String>();
tabs.put("outlet_detail", "<a href='javascript:tab.load(\"/NewApp.do?dispatch=outlet_detail\")'>Outlet Detail</a>");
tabs.put("payment_info", "<a href='javascript:tab.load(\"/NewApp.do?dispatch=payment_info\")'>Payment Information</a>");
tabs.put("statement_option", "<a href='javascript:tab.load(\"/NewApp.do?dispatch=statement_option\")'>Statement Option</a>");
tabs.put("other_info", "<a href='javascript:tab.load(\"/NewApp.do?dispatch=other_info\")'>Other Information</a>");
tabs.put("physical_address", "<a href='javascript:tab.load(\"/NewApp.do?dispatch=physical_address\")'>Physical Address</a>");
tabs.put("payment_address", "<a href='javascript:tab.load(\"/NewApp.do?dispatch=payment_address\")'>Payment Address</a>");
tabs.put("correspondence_address", "<a href='javascript:tab.load(\"/NewApp.do?dispatch=correspondence_address\")'>Correspondence Address</a>");
tabs.put("mdr_form", "<a href='javascript:tab.load(\"/NewApp.do?dispatch=mdr_form\")'>MDR Form</a>");

/*
String html = "<ul class='nav nav-tabs'>"
			+ 	"<li id='outlet_detail'><a href='javascript:tab.load(\"/NewApp.do?dispatch=outlet_detail\")'>Outlet Detail</a></li>"
			+	"<li id='payment_info'><a href='javascript:tab.load(\"/NewApp.do?dispatch=payment_info\")'>Payment Information</a></li>"
			+	"<li id='statement_option'><a href='javascript:tab.load(\"/NewApp.do?dispatch=statement_option\")'>Statement Option</a></li>"
			+	"<li id='other_info'><a href='javascript:tab.load(\"/NewApp.do?dispatch=other_info\")'>Other Information</a></li>"
			+	"<li id='physical_address'><a href='javascript:tab.load(\"/NewApp.do?dispatch=physical_address\")'>Physical Address</a></li>"
			+	"<li id='payment_address'><a href='javascript:tab.load(\"/NewApp.do?dispatch=payment_address\")'>Payment Address</a></li>"
			+	"<li id='correspondence_address'><a href='javascript:tab.load(\"/NewApp.do?dispatch=correspondence_address\")'>Correspondence Address</a></li>"
			+	"<li id='mdr_form'><a href='javascript:tab.load(\"/NewApp.do?dispatch=mdr_form\")'>MDR Form</a></li>"
			+ "</ul>";
*/

Casemast c = null;
if(request.getAttribute("m_case") != null) {
	c = (Casemast)request.getAttribute("m_case");
}

String html = "<ul class='nav nav-tabs'>";

for(String s : tabs.keySet()){
	if(c.getStatus().equals("PUT UP") == false && oSecUserDao.getGroupCode().startsWith("03")){
		if(s.equals("payment_info") == false && s.equals("mdr_form") == false){
			html += "<li id=\"" + s + "\">" + tabs.get(s) + "</li>";
		}
	} else {
		html += "<li id=\"" + s + "\">" + tabs.get(s) + "</li>";
	}
}

html += "</ul>";
html = html.replace("<li id=\"" + EncryptionHelper.decrypt(request.getParameter("active")) + "\">", "<li id=\"" + EncryptionHelper.decrypt(request.getParameter("active")) + "\" class=\"active\">");

out.println(html);
%>